package com.lxs.mall.exception;

/**
 * @author 小松
 */
public class LxsMallException extends RuntimeException{
    private final Integer code;
    private final  String message;

    public LxsMallException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public LxsMallException(LxsMallExceptionEnum exceptionEnum) {
        this(exceptionEnum.getCode(),exceptionEnum.getMsg());
    }

    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
